<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>项目归档管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#btnExport").click(function(){
				top.$.jBox.confirm("确认要导出数据吗？","系统提示",function(v,h,f){
					if(v=="ok"){
						$("#searchForm").attr("action","${ctx}/zx/proFiling/export");
						$("#searchForm").submit();
					}
				},{buttonsFocus:1});
				top.$('.jbox-body .jbox-icon').css('top','55px');
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/zx/proFiling/">项目列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="proFiling" action="${ctx}/zx/proFiling/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li>
				<label>项目编号：</label>
				<form:input path="lzd.proNo" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li>
				<label>项目分类：</label>
				<sys:treeselect id="cgml" name="lzd.cgml.id" value="${lzd.cgml.id}" labelName="lzd.cgml.name" labelValue="${lzd.cgml.name}"
					title="项目具体分类" url="/zx/cgml/treeData" cssClass="required" />
			</li>
			<li>
				<label>归档状态：</label>
				<form:select path="entry" cssStyle="width: 177px;">
					<form:option value="" htmlEscape="false">请选择</form:option>
					<form:option value="1" htmlEscape="false">已归档</form:option>
					<form:option value="o" htmlEscape="false">未归档</form:option>
				</form:select>
			</li>
			<li class="clearfix"></li>
			<li>
				<label>项目名称：</label>
				<form:input path="lzd.proName" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li>
				<label>项目具体分类：</label>
				<sys:treeselect id="keyword" name="lzd.keyword.id" value="${lzd.keyword.id}" labelName="lzd.keyword.name" labelValue="${lzd.keyword.name}"
					title="项目具体分类" url="/zx/keyword/treeData" cssClass="required" />
			</li>
			<li>
				<label>归档时间：</label>
				<input name="contractsDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${proFiling.contractsDate}" pattern="yyyy-MM"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM',isShowClear:true})"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/><input id="btnExport" class="btn btn-primary" type="button" value="导出"/></li>
			
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>项目名称</th>
				<th>项目编号</th>
				<th>是否归档</th>
				<th>归档时间</th>
				<th>项目类型</th>
				<th>标书制作人</th>
				<th>项目执行人</th>
				<!-- <th>项目执行人</th> -->
				<th>项目负责人</th>
				<th>招标方式</th>
				<!-- <th>预算金额</th> -->
				<shiro:hasPermission name="zx:proFiling:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="pf">
			<tr>
				<td title="${pf.proName}">
					${fns:abbr(pf.proName, 70)}
					<span class="label label-success" style="margin-left: 5px;font-size: 90%;font-weight: 400;">${pf.ts.sectionName}</span>
					<c:if test="${not empty pf.resetLzdId}">
						<span class="label label-info" style="margin-left: 5px;font-size: 90%;font-weight: 400;">${pf.restartCount}次</span>
					</c:if>
					<c:if test="${pf.trashPro eq '0'}">
						<span class="label label-warning" style="margin-left: 5px;font-size: 90%;font-weight: 400;" title="废标原因：${pf.trashContent}">废标</span>
					</c:if>
				</td>
				<td> 
					${pf.proNo}
				</td>
				<td>
					<c:if test="${pf.entryLabel eq '1'}">
						<span class="label label-success" style="margin-left: 5px;font-size: 90%;font-weight: 400;">已归档</span>
					</c:if>
					<c:if test="${pf.entryLabel eq '0' || empty pf.entryLabel}">
						<span class="label label-warning" style="margin-left: 5px;font-size: 90%;font-weight: 400;">未归档</span>
					</c:if>
				</td>
				<td><fmt:formatDate value="${pf.contractsDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				<td>
					${pf.cgmlName}
				</td>
				<td>${pf.makeTenderBy}</td>
				<td>${pf.proPerformer}</td>
				<%-- <td>
					${lzd.proPerformer}
				</td> --%>
				<td>
					${pf.proPic}
				</td>
				<td>
					${fns:getDictLabel(pf.tenderWay, 'tender_way', '无')}
				</td>
				<%-- <td>
					<fmt:formatNumber value="${lzd.budgetMoney}" type="currency" pattern="￥.000000"/>
				</td> --%>
				<shiro:hasPermission name="zx:proFiling:edit"><td>
    				<a href="${ctx}/zx/proFiling/form?lzdId=${pf.lzd.id}&sectionId=${pf.ts.id}">项目归档</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>